package com.bgys.system.controller;

import com.bgys.common.domain.AjaxResult;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * 系统管理接口
 * @author 悲歌易水
 */
@Slf4j
@RestController
@RequestMapping("/system")
public class LoginController {

    @ApiOperation(value = "系统登录", httpMethod = "POST", response = AjaxResult.class)
    @PostMapping("/login")
    public AjaxResult login(String username, String password) {
        log.debug("系统登录： {},{}", username, password);
        String token = "qwerty";
        Map<String, String> data = new HashMap<>();
        data.put("token", "token");

        AjaxResult<Map<String, String>> ajaxResult = AjaxResult.success("登录成功", data);
        return ajaxResult;
    }
}
